import request from '@/utils/request'

const location = {
  list(params){
    return request.get("/system/location/list", { params })
  },
  treeselect() {
    return request.get("/system/location/treeSelect")
  },
  add(data){
    return request.post("/system/location/add", data)
  },
  edit(data){
    return request.post("/system/location/update", data)
  },
  del(id){
    return request.post(`/system/location/delete/${id}`)
  },
  get(id){
    return request.get(`/system/location/detail/${id}`)
  },
}

export default location;
